<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('工资条打印')" />
	<style type="text/css">
	body {
			overflow-x: auto;
		}
		table {
			font-size: 14px;
			font-weight:500;
			font-family: 线体;
			margin-left: 50px;
	    	border-collapse: collapse;
		}
	    table, tr, td{
		    text-align: center;
		    width: 1200px;
		    height: 40px;
		}
		.items td{ height:30px; border: 1px solid black;}
		
		@media print{
		   body {
		       height: auto !important;
		   }
		}
	</style>
</head>
<body class="white-bg">
    <table style="margin-top: 0px;">
		<!-- 打印网页时通过hidden-print隐藏元素 -->
	    <div class="text-right hidden-print">
	        <input th:value="${years}" type="hidden" id="years" name="years" />
            <button id="button-yes" type="button" class="btn btn-sm btn-primary" ><i class="fa fa-check"></i>审核通过</button>&nbsp;
            <button id="button-no" type="button" class="btn btn-sm btn-danger" ><i class="fa fa-remove"></i>审核拒绝</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
	    </div>
		<tr style="height: 60px;">
			<td style="text-align: left"><img style="height: 30px" src="/ruoyi.png"></td>
			<td style="font-size: 30px;font-family: 线体;font-weight:500;">湖北鄂能电力建设有限公司工资表【<span th:text="${years}"></span>】</td>
		</tr>
	</table>
	<table class="items">
		<tr>
			<td style="width: 5%" rowspan="2"><b>姓  名</b></td>
			<td style="width: 5%" rowspan="2"><b>基本工资</b></td>
			<td style="width: 5%" rowspan="2"><b>岗位津贴</b></td>
			<td style="width: 5%" rowspan="2"><b>午餐补助</b></td>
			<td style="width: 5%" rowspan="2"><b>通讯补助</b></td>
			<td style="width: 5%" rowspan="2"><b>交通补助</b></td>
			<td style="width: 5%" rowspan="2"><b>其他</b></td>
			<td style="width: 5%" rowspan="2"><b>应发工资</b></td>
			<td style="width: 10%" colspan="2"><b>社保</b></td>
			<td style="width: 10%" colspan="2"><b>公积金</b></td>
			<td style="width: 5%" rowspan="2"><b>个人所得稅</b></td>
			<td style="width: 5%" rowspan="2"><b>合   计</b></td>
			<td style="width: 5%" rowspan="2"><b>实发工资</b></td>
			<td style="width: 5%" rowspan="2"><b>备  注</b></td>
		</tr>
		<tr>
			<td style="width: 5%"><b>个人承担</b></td>
			<td style="width: 5%"><b>公司承担</b></td>
			<td style="width: 5%"><b>个人承担</b></td>
			<td style="width: 5%"><b>公司承担</b></td>
		</tr>
		<tr th:each="lis,status:${lis}">
			<td style="width: 5%;" th:text="${lis.name}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.jbgz}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.gwjt}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.wcbt}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.txbt}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.jtbt}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.qt}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.yfgz}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.sbgrcd}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.sbgscd}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.gjjgrcd}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.gjjgscd}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.grsds}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.hj}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.sfgz}">&nbsp;</td>
			<td style="width: 5%;" th:text="${lis.memo}">&nbsp;</td>
		</tr>
	</table>
	<table style="margin-top: 15px;">
		<tr>
			<td colspan="2" style="width: 22%;text-align: left;"><b>发放时间：<span th:text="${years}"></span></b></td>
			<td colspan="2" style="width: 14%;text-align: left;"><b>财务审核：</b><span th:text="${cwsh}"></span></td>
			<td style="width: 10%">&nbsp;</td>
			<td style="width: 10%;text-align: left;"><b>领导审批：</b><span th:text="${zjlsb}"></span></td>
			<td style="width: 10%">&nbsp;</td>
		</tr>
	</table>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        function printPage() {
            window.print();
        }
        
        $("#button-yes").click(function(){
	    	$.modal.confirm("确认要审核通过吗?", function() {
	    		$.ajax({
    				url: "/gcgl/gzt/zjlyes",
    				type: "post",
    				data: { "years": $("#years").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
	    
	    $("#button-no").click(function(){
	    	$.modal.confirm("确认要审核拒绝吗?", function() {
	    		$.ajax({
    				url: "/gcgl/gzt/zjlno",
    				type: "post",
    				data: { "years": $("#years").val() },
    				dataType: 'json',
    				success: function(data) {
    					$.operate.saveReload(data);
    				},
    				error: function(xhr, type, errorThrown) {
    					//异常处理；
    					$.modal.alert("请稍后再试！");
    					$.operate.saveReload(data);
    				}
    			});
	    	});
	    })
    </script>
</body>
</html>